namespace DotNetNuke.Framework.Providers
{
    using System;
    using System.Collections;
    using System.Collections.Specialized;
    using System.Xml;

    public class Provider
    {
        private NameValueCollection _ProviderAttributes;
        private string _ProviderName;
        private string _ProviderType;

        public Provider(XmlAttributeCollection Attributes)
        {
            IEnumerator refObjectHelperL0=null;
            this._ProviderAttributes = new NameValueCollection();
            this._ProviderName = Attributes["name"].Value;
            this._ProviderType = Attributes["type"].Value;
            try
            {
                refObjectHelperL0 = Attributes.GetEnumerator();
                while (refObjectHelperL0.MoveNext())
                {
                    XmlAttribute Attribute = (XmlAttribute) refObjectHelperL0.Current;
                    if ((Attribute.Name != "name") & (Attribute.Name != "type"))
                    {
                        this._ProviderAttributes.Add(Attribute.Name, Attribute.Value);
                    }
                }
            }
            finally
            {
                if (refObjectHelperL0 is IDisposable)
                {
                    (refObjectHelperL0 as IDisposable).Dispose();
                }
            }
        }

        public NameValueCollection Attributes
        {
            get
            {
                return this._ProviderAttributes;
            }
        }

        public string Name
        {
            get
            {
                return this._ProviderName;
            }
        }

        public string Type
        {
            get
            {
                return this._ProviderType;
            }
        }
    }
}

